
*	************************************************************************
* 	File-Name: 		GEC_2013_CDMChina_replication.do
*	Date:  			19 December 2012
*	Authors: 		Patrick Bayer, Johannes Urpelainen, and Jeremy Wallace
*	Journal:		Global Environmental Change
* 	Paper:			Who Uses the Clean Development Mechanism? An Empirical Analysis of Projects in Chinese Provinces
*
*	Data Used:  	CDMChina.dta	
*	Purpose:   		.do file for replication
*	Software:		Stata IC 12.1
*	Machine:		WINDOWS 7
*
*	************************************************************************

clear all

* NB: Please place .do file and data in the same folder
use "./CDMChina.dta"
set more off, permanently


*	************************************************************************
*	(I) MAIN TEXT
*	************************************************************************

*	************************************************************************
*	1. Summary statistics
*	************************************************************************

quietly xi: xtnbreg projectcount elecnew GDPnew fdinew windnew solarnew hydro popnew growth primaryratio i.regionalid  i.year, re 
estpost summarize  projectcount elecnew GDPnew fdinew windnew solarnew hydro popnew growth primaryratio if e(sample)


*	************************************************************************
*	2. Correlation matrics
*	************************************************************************

quietly xi: xtnbreg projectcount elecnew GDPnew fdinew windnew solarnew hydro popnew growth primaryratio i.regionalid  i.year, re 
estpost correlate projectcount elecnew GDPnew fdinew windnew solarnew hydro popnew growth primaryratio if e(sample), matrix

*	************************************************************************
*	3. Main models
*	************************************************************************

eststo clear
eststo: xi: xtnbreg projectcount elecnew GDPnew fdinew windnew solarnew hydro i.regionalid i.year, re
eststo: xi: xtnbreg projectcount elecnew GDPnew fdinew windnew solarnew hydro popnew growth i.regionalid i.year, re 
eststo: xi: xtnbreg projectcount elecnew GDPnew fdinew windnew solarnew hydro popnew growth primaryratio i.regionalid  i.year, re 

eststo: xi: xtnbreg renewables elecnew GDPnew fdinew windnew solarnew hydro i.regionalid i.year, re
eststo: xi: xtnbreg renewables elecnew GDPnew fdinew windnew solarnew hydro popnew growth i.regionalid i.year, re 
eststo: xi: xtnbreg renewables elecnew GDPnew fdinew windnew solarnew hydro popnew growth primaryratio i.regionalid  i.year, re 

eststo: xi: xtnbreg other elecnew GDPnew fdinew windnew solarnew hydro i.regionalid i.year, re
eststo: xi: xtnbreg other elecnew GDPnew fdinew windnew solarnew hydro popnew growth i.regionalid i.year, re 
eststo: xi: xtnbreg other elecnew GDPnew fdinew windnew solarnew hydro popnew growth primaryratio i.regionalid  i.year, re 


*	************************************************************************
*	(II) APPENDIX
*	************************************************************************

*	************************************************************************
*	A2 -- Full Model Results (Table A1)
*	************************************************************************

* Create region dummies
gen northeast = 0
replace northeast = 1 if regionalid==1
label variable northeast "Northeastern Region"

gen east = 0
replace east = 1 if regionalid==2
label variable east "Eastern Region"

gen north = 0
replace north = 1 if regionalid==3
label variable north "Northern Region"

gen northwest = 0
replace northwest = 1 if regionalid==4
label variable northwest "Northwestern Region"

gen southcentral = 0
replace southcentral = 1 if regionalid==5
label variable southcentral "South-Central Region"

gen southwest = 0
replace southwest = 1 if regionalid==6
label variable southwest "Southwestern Region"

local regions north northeast east southcentral southwest

* Run full models
eststo clear
eststo: xi: xtnbreg projectcount elecnew GDPnew fdinew windnew solarnew hydro `regions' i.year, re
eststo: xi: xtnbreg projectcount elecnew GDPnew fdinew windnew solarnew hydro popnew growth `regions' i.year, re 
eststo: xi: xtnbreg projectcount elecnew GDPnew fdinew windnew solarnew hydro popnew growth primaryratio `regions' i.year, re 

eststo: xi: xtnbreg renewables elecnew GDPnew fdinew windnew solarnew hydro `regions' i.year, re
eststo: xi: xtnbreg renewables elecnew GDPnew fdinew windnew solarnew hydro popnew growth `regions' i.year, re 
eststo: xi: xtnbreg renewables elecnew GDPnew fdinew windnew solarnew hydro popnew growth primaryratio `regions' i.year, re 

eststo: xi: xtnbreg other elecnew GDPnew fdinew windnew solarnew hydro `regions' i.year, re
eststo: xi: xtnbreg other elecnew GDPnew fdinew windnew solarnew hydro popnew growth `regions' i.year, re 
eststo: xi: xtnbreg other elecnew GDPnew fdinew windnew solarnew hydro popnew growth primaryratio `regions' i.year, re 

*	************************************************************************
*	A3 -- Zero Inflated Negative Binomial (Table A2)
*	************************************************************************

eststo clear
eststo: xi: zinb projectcount elecnew GDPnew fdinew windnew solarnew hydro i.regionalid i.year, inflate(year) vuong zip
eststo: xi: zinb projectcount elecnew GDPnew fdinew windnew solarnew hydro popnew growth i.regionalid i.year, inflate(year) vuong zip
eststo: xi: zinb projectcount elecnew GDPnew fdinew windnew solarnew hydro popnew growth primaryratio i.regionalid  i.year, inflate(year) vuong zip

eststo: xi: zinb renewables elecnew GDPnew fdinew windnew solarnew hydro i.regionalid i.year, inflate(year) vuong zip
eststo: xi: zinb renewables elecnew GDPnew fdinew windnew solarnew hydro popnew growth i.regionalid i.year, inflate(year) vuong zip 
eststo: xi: zinb renewables elecnew GDPnew fdinew windnew solarnew hydro popnew growth primaryratio i.regionalid  i.year, inflate(year) vuong zip 

eststo: xi: zinb other elecnew GDPnew fdinew windnew solarnew hydro i.regionalid i.year, inflate(year) vuong zip
eststo: xi: zinb other elecnew GDPnew fdinew windnew solarnew hydro popnew growth i.regionalid i.year, inflate(year) vuong zip 
eststo: xi: zinb other elecnew GDPnew fdinew windnew solarnew hydro popnew growth primaryratio i.regionalid  i.year, inflate(year) vuong zip


*	************************************************************************
*	A4 -- Robustness (Tables A3-A4)
*	************************************************************************

* Robustness: Political Control Model (Table A3)
local polcontrols govage partysecage turnover retirement

eststo clear
eststo: xi: xtnbreg projectcount elecnew GDPnew fdinew windnew solarnew hydro `polcontrols' i.regionalid i.year, re
eststo: xi: xtnbreg projectcount elecnew GDPnew fdinew windnew solarnew hydro `polcontrols' popnew growth  i.regionalid i.year, re 
eststo: xi: xtnbreg projectcount elecnew GDPnew fdinew windnew solarnew hydro `polcontrols' popnew growth primaryratio i.regionalid  i.year, re 

eststo: xi: xtnbreg renewables elecnew GDPnew fdinew windnew solarnew hydro `polcontrols' i.regionalid i.year, re
eststo: xi: xtnbreg renewables elecnew GDPnew fdinew windnew solarnew hydro `polcontrols' popnew growth i.regionalid i.year, re 
eststo: xi: xtnbreg renewables elecnew GDPnew fdinew windnew solarnew hydro `polcontrols' popnew growth primaryratio  i.regionalid  i.year, re 

eststo: xi: xtnbreg other elecnew GDPnew fdinew windnew solarnew hydro `polcontrols' i.regionalid i.year, re
eststo: xi: xtnbreg other elecnew GDPnew fdinew windnew solarnew hydro `polcontrols' popnew growth i.regionalid i.year, re 
eststo: xi: xtnbreg other elecnew GDPnew fdinew windnew solarnew hydro `polcontrols' popnew growth primaryratio i.regionalid  i.year, re 

* Robustness: Main Models with CDM Service Center Control (Table A4)
eststo clear
eststo: xi: xtnbreg projectcount elecnew GDPnew fdinew windnew solarnew hydro CDMservice i.regionalid i.year, re
eststo: xi: xtnbreg projectcount elecnew GDPnew fdinew windnew solarnew hydro CDMservice popnew growth i.regionalid i.year, re 
eststo: xi: xtnbreg projectcount elecnew GDPnew fdinew windnew solarnew hydro CDMservice popnew growth primaryratio i.regionalid  i.year, re 

eststo: xi: xtnbreg renewables elecnew GDPnew fdinew windnew solarnew hydro CDMservice i.regionalid i.year, re
eststo: xi: xtnbreg renewables elecnew GDPnew fdinew windnew solarnew hydro CDMservice popnew growth i.regionalid i.year, re 
eststo: xi: xtnbreg renewables elecnew GDPnew fdinew windnew solarnew hydro CDMservice popnew growth primaryratio i.regionalid  i.year, re 

eststo: xi: xtnbreg other elecnew GDPnew fdinew windnew solarnew hydro CDMservice i.regionalid i.year, re
eststo: xi: xtnbreg other elecnew GDPnew fdinew windnew solarnew hydro CDMservice popnew growth i.regionalid i.year, re 
eststo: xi: xtnbreg other elecnew GDPnew fdinew windnew solarnew hydro CDMservice popnew growth primaryratio i.regionalid  i.year, re 

